const app = getApp()
export const request = (params) => {
    console.log(params);
    // parmas 请求路径
    // 定义公共路径
    const baseUrl = "https://592c98l599.yicp.fun";
    return new Promise((resolve, reject) => {
        wx.request({
            ...params,
            url: baseUrl + params.url,
            success: (result) => {
                resolve(result);
            },
            fail: (err) => {
                reject(err);
            }
        })
    })
}